Skip to content

fix: show actual error cause in harness startup failure dialog - #84

Open
yaojin3616 wants to merge 1 commit into
mainfrom
fix/harness-failure-error-diagnostics
Open

fix: show actual error cause in harness startup failure dialog#84
yaojin3616 wants to merge 1 commit into
mainfrom
fix/harness-failure-error-diagnostics

Conversation

@yaojin3616

Copy link
Copy Markdown
Contributor

When the Harness process exits unexpectedly during startup, users only saw "exit code 1" with no indication of what actually went wrong. This change extracts the most relevant error from captured stderr and includes it directly in the failure message.

Changes

  • Added extractFailureCause() function that scans log lines for known error patterns (DSH entry failure, uncaught exceptions, unhandled rejections, generic error lines)
  • Updated the harness exit handler to include the extracted cause in the failure state message
  • Added 9 test cases covering all extraction paths and edge cases

Issue

Closes #77

Verification

  • All 90 tests pass (9 new + 81 existing)
  • TypeScript typecheck passes
  • Production build succeeds

When the Harness process exits unexpectedly during startup, users only
saw 'exit code 1' with no indication of what actually went wrong. This
change extracts the most relevant error from the captured stderr and
includes it directly in the failure message, so the dialog shows the
actual cause (e.g. plugin load failures, missing modules, config errors)
without requiring users to dig into the log file.

Closes #77
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

插件无法卸载,服务无法加载,加载提供方目录失败: transport failure for /api/llm.providers: HTTP 404

1 participant